#! 
# by jzhang @ 21:17 2004-01-13  mailto:jzhang
#  demostrate how to use format in perl 
#


srand;

for(1..20)
{
    $name = '';
    for(1..5)
    {
	$name = $name.('a'...'z')[rand(26)];
    }

    push @names,$name;
    push @ages,int rand(50)+15;
    push @subsidies,rand(10000);
}

for $i (0..$#names)
{
    $name = $names[$i];
    $age = $ages[$i];
    $subsidy = $subsidies[$i];
    write;
}

format STDOUT_TOP =
                         Test table
 Name                Age  subsidy
 ------------------------------------------------------------------
.
 format STDOUT =
 @<<<<<<<<<<<<<<<<<< @<<< @<<<<<<<
 $name,              $age,$subsidy
.
